Stabilize RI RPA/EXX and Ewald EXX method merge on develop#7019
Stabilize RI RPA/EXX and Ewald EXX method merge on develop#7019AroundPeking wants to merge 14 commits intodeepmodeling:developfrom
Conversation
- integrate the RI/RPA post-SCF workflow with develop - restore Coulomb/input-output handling and sparse matrix precision - fix nspin=2 and TRS symmetry output regressions
The default was accidentally changed to "none", causing all tests without explicit latname to fail at STRU parsing with "do not use LATTICE_VECTORS along with explicit specification of lattice type".
The previous merge accidentally changed exx_singularity_correction reset logic (lc_pbe etc from "spencer" to "massidda") and removed metadata, causing 08_EXX integration tests to fail. Restore the develop version and append new RI parameters (shrink_abfs_pca_thr, shrink_lu_inv_thr, exx_coul_moment, exx_rotate_abfs, exx_multip_moments_threshold, out_unshrinked_v).
The removal of filter_empty_orbs calls caused empty orbital shells to be retained in lcaos and abfs vectors, altering RI exchange integrals for all EXX calculations including standard HF used by LR-TDDFT.
The PR removed the filter_empty_orbs function from Construct_Orbs and inlined its logic into change_orbs() for lcaos. The previous commit incorrectly called the now-deleted function. This commit inlines the same filtering logic directly for abfs to restore the empty orbital shell removal without depending on the deleted function.
…formula - Restore LRI_CV, Matrix_Orbs11/21/22, exx_abfs-construct_orbs, exx_opt_orb, ABFs_Construct-PCA to develop versions to minimize diff - Fix spencer Rcut: use get_nkstot_full() without /nspin0 division (nkstot_full already excludes spin doubling) - Fix shared_ptr<ORB_gaunt_table> usage in Exx_LRI, RPA_LRI - Fix ewald_Vq compilation errors - Fix exx_opt_orb-print.cpp to match develop API
The spencer Rcut formula was corrected to not divide by nspin0 (get_nkstot_full() already excludes spin doubling), which changes the excitation energy result from 6.050430 to 2.574437.
The previous ref (2.574437) was from fisherd which lacks LibXC, producing different results. Use CI environment's actual value.
There was a problem hiding this comment.
we need unit tests for new features in k points
There was a problem hiding this comment.
Done.
I added a unit test for the new k-point behavior in source/source_cell/test/klist_test_para.cpp.
The test now checks:
nkstot_fullis generated correctlykvec_c_fullis consistent across ranks within the same pool after MPI k-point distribution
This was added in commit 173490d30.
|
Thanks for your PR, which extends the functionality of ABACUS. I noticed you have introduced several new input parameters. I would suggest adding corresponding unit or integration tests to ensure your results are not affected by future refactoring work from others in ABACUS. |
e643d5c to
9e6b5a5
Compare
Done. I added integration coverage for the new RPA-related workflow to reduce the risk of future refactoring changing these outputs silently. The PR now includes:
One follow-up fix was also needed for CI: these RPA files are now compared by absolute value, because the ABF / shrink basis eigenvectors have an arbitrary overall sign, which can flip the sign of The test additions were added in commit |
Summary
This PR consolidates the RI RPA/EXX merge work onto current
developand resolves the main regressions found during validation.Main changes
developnspin=2RI / overlap-matrix output inconsistenciessymrot_koutput to avoid symmetry-related crashesValidation
Checked against the regression cases discussed during debugging, including:
cut/matoutput consistencynspin=2LibRPA-related workflow consistencyprint_symrot_info_k()Notes